<?php
include 'konek.php';
$username=$_POST['email'];
$password=$_POST['password'];

$sql=mysql_query("SELECT * FROM admin WHERE name_admin='$username' and passwd='$password' ");
$cek=mysql_num_rows($sql);
if($cek)
{
	session_start();
	$_SESSION['admin'] = $username;
	$_SESSION["RF"]["subfolder"] =NULL;
	header('location:../dashboard.php');
}
else
{
	echo'<script>alert("password/username salah");document.location="../"</script>';
}

?>